<template>
  <div class="app-container">
    <div class="block">
      <el-timeline>
<!--        <el-timeline-item timestamp="2018/4/2" placement="top">-->
<!--          <el-card>-->
<!--            <h4>更新 Github 模板</h4>-->
<!--            <p>王小虎 提交于 2018/4/2 20:46</p>-->
<!--          </el-card>-->
<!--        </el-timeline-item>-->

        <el-timeline-item
          v-for="(item, index) in this.projectTImeNodeData"
          :key="index"
          :timestamp="parseTime(item.create_time,'{y}-{m}-{d}')"
          placement="top">
          <el-card>
            <router-link :to="{path:item.jump,query:{businessId:item.business_id}}" class="bullshit__return-home">
              <span class="link-type" style="font-size: 17px">{{item.node_name}}</span> <span style="font-size: 15px">{{item.exec_time}}</span>
            </router-link>
            <p>{{item.nick_name}} 提交于 {{parseTime(item.create_time,'{y}-{m}-{d} {h}:{i}:{s}')}}</p>
          </el-card>
        </el-timeline-item>
      </el-timeline>
    </div>
  </div>
</template>

<script>
  import { selectProjectTimeNodeInfo } from "@/api/statistics/reportForms";
  export default {
    name: "gantetu",
    data() {
      return {
        // 遮罩层
        loading: true,
        // 选中数组
        ids: [],
        // 非单个禁用
        single: true,
        // 非多个禁用
        multiple: true,
        // 显示搜索条件
        showSearch: true,
        // 总条数
        total: 0,
        //  项目时间节点node信息
        projectTImeNodeData:[],
      };
    },
    created() {
      const reportInfoId = this.$route.params && this.$route.params.reportInfoId;
      this.getProjectTimeNodeInfo(reportInfoId);
    },
    methods: {
      /** 查询占道报备未撤场单子 */
      getProjectTimeNodeInfo(reportInfoId) {
        this.loading = true;
        selectProjectTimeNodeInfo({reportInfoId:reportInfoId}).then(response => {
          this.projectTImeNodeData = response.data;
          this.loading = false;
        });
      },

    }
  };
</script>

